test-pull-summary-sigs: Set timestamps to serve expected files
authorSimon McVittie <smcv@collabora.com>
Sun, 22 Nov 2020 13:17:24 +0000 (13:17 +0000)
committerSimon McVittie <smcv@debian.org>
Sun, 22 Nov 2020 13:24:35 +0000 (13:24 +0000)
commit628e175fc4e8021377e3c6963a457f92127b5345
tree5b1b1ec1483f20739085c4954abb2e5ec92282a2
parentef9424512b71045e924c5173fbda7265cf1fe4b4
test-pull-summary-sigs: Set timestamps to serve expected files

If this is not done, the test can fail when the temporary directory is
a tmpfs: for example this happens during build-time testing with /var/tmp
on tmpfs or TEST_TMPDIR pointing to a tmpfs, or installed-tests with
gnome-desktop-testing-runner allocating the test directory on a tmpfs.

In particular, many of Debian's official autobuilders now do the entire
build and test procedure in a chroot hosted on a tmpfs, to improve build
performance and prevent fsync overhead.

In this situation, it appears that overwriting summary.sig with a copy
of summary.sig.2 is not sufficient for the web server to tell the
libostree client that it needs to be re-downloaded. I'm not completely
sure why, because tmpfs does appear to have sub-second-resolution
timestamps, but forcing a distinct mtime is certainly enough to
resolve it.

Resolves: https://github.com/ostreedev/ostree/issues/2245
Bug-Debian: https://bugs.debian.org/975418
Signed-off-by: Simon McVittie <smcv@collabora.com>
Forwarded: https://github.com/ostreedev/ostree/pull/2246

Gbp-Pq: Name test-pull-summary-sigs-Set-timestamps-to-serve-expected-f.patch
tests/test-pull-summary-sigs.sh